An Implementation of Subtyping Among Regular Expression Types
نویسندگان
چکیده
We introduce a novel implementation of subtyping among regular expression types in terms of Haskell-style type classes by making use of some modest type class extensions. We assume that each regular expression type has some underlying structured runtime representation. Hence, we not only check for the containment problem among regular expressions, but also automatically derive some appropriate casting functions among the underlying structured values. We believe that this work is the first step in adding type-safe XML support to languages such as Haskell.
منابع مشابه
Subtyping With Antimirov’s Algorithm
I start with an explanation of the notion of ‘subtyping’ to make clear what it means to subtype a type r against a type s. It will be pointed out, how types are represented in the subtyping algorithm. Then I will explain the main idea of the subtyping algorithm and make clear what subconcepts are needed. In detail, those are the concepts of checking for -inclusion, leading names and partial der...
متن کاملRegular Expression Subtyping for XML Query and Update Languages
XML database query languages such as XQuery employ regular expression types with structural subtyping. Subtyping systems typically have two presentations, which should be equivalent: a declarative version in which the subsumption rule may be used anywhere, and an algorithmic version in which the use of subsumption is limited in order to make typechecking syntax-directed and decidable. However, ...
متن کاملSubtyping for F-Bounded Quantifiers and Equirecursive Types
This paper defines a notion of binding trees that provide a suitable model for second-order type systems with F-bounded quantifiers and equirecursive types. It defines a notion of regular binding trees that correspond in the right way to notions of regularity in the first-order case. It defines a notion of subtyping on these trees and proves various properties of the subtyping relation. It defi...
متن کاملSubtyping Constrained Types ( Draft ) Valery Trifonov
Constrained type systems are a natural generalization of Hindley/Milner type inference to languages with subtyping. This paper develops several subtyping relations on constrained types. We establish a full type abstraction property that equates an operational notion of subtyping with a semantic notion based on regular trees. The decidability of this notion of subtyping is open; we present a dec...
متن کاملTypes and Subtypes for Client-Server Interactions
We define an extension of the π-calculus with a static type system which supports high-level specifications of extended patterns of communication, such as client-server protocols. Subtyping allows protocol specifications to be extended in order to describe richer behaviour; an implemented server can then be replaced by a refined implementation, without invalidating type-correctness of the overa...
متن کامل